Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Const HWND_TOPMOST = -1
Private Const HWND_NOTOPMOST = -2
Option Base 1 ' set the default lower array limit
Dim mblnLoading As Boolean
Private Sub cmdClear_Click()
List1.RemoveItem List1.ListIndex
cmdClear.Enabled = False
cmdSet.Enabled = True
cmdSet.SetFocus
End Sub
Private Sub cmdClearAll_Click()
List1.Clear ' clear them
Text1.Text = "" 'clear the tab text
Text1.SetFocus 'set focus to the new tab box
End Sub
Private Sub cmdSet_Click()
List1.AddItem Text1.Text
cmdClear.Enabled = True
cmdSet.Enabled = False
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
SetWindowPos hwnd, _
HWND_TOPMOST, 0, 0, 0, 0, _
SWP_NOMOVE + SWP_NOSIZE
mblnLoading = True
End Sub
Private Sub Command1_Click()
Dim X As Integer
If List1.Text <> "" Then
With Form1.RichTextBox1
.SelTabCount = List1.Text
For X = 0 To .SelTabCount - 1
.SelTabs(X) = List1.Text * X
Next X
End With
Unload Me
Else
Me.Visible = False
MsgBox "Please select a tab.", vbInformation, "Alconsoft - Editor Plus"
Me.Visible = True
End If
End Sub
Private Sub Form_Paint()
If mblnLoading = True Then
Dim intI As Integer
For intI = 0 To Form1.RichTextBox1.SelTabCount - 1